package com.cino.system.mapper;

import com.cino.system.domain.Role;
import com.cino.basic.base.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author Cino
 * @since 2023-02-13
 */

public interface RoleMapper extends BaseMapper<Role> {

    //@param传了多个参数，取别名当做是参数而不是对象
    void addRoleMenus(@Param("id")Long id, @Param("menus")List<Long> menus);
    void addRolePermissions(@Param("id")Long id, @Param("permissions")List<Long> permissions);
    void delMenusByRoleId(Long id);
    void delPermissionsByRoleId(Long id);
    void delEmployeeRoleByRoleId(Long id);
}
